import { createRouter, createWebHashHistory } from "vue-router"


const routes = [
    {
        path: "/",
        redirect: "/login"
    },

    {
        name: "Login",
        path: "/login",
        component: () => import("@/views/login/index.vue")
    },
    {
        name: "Menu",
        path: "/menu",
        component: () => import("@/views/menu/index.vue"),
        children: [{
            name: "Home",
            path: "home",
            meta: {
                title: "首页",
                path: "/menu/home"
            },
            component: () => import("@/views/home/index.vue")
        }, {
            name: "SystemSet",
            path: "systemSet",
            meta: {
                title: "系统设置",
                path: "/menu/systemSet"
            },
            component: () => import("@/views/systemSet/index.vue")
        },]
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router